package cn.jishiyu11.xeqb.service

/**
 * Created by jsy_zj on 2017/12/7.
 */

import android.content.Context
import android.util.Log

import com.igexin.sdk.GTIntentService
import com.igexin.sdk.message.GTCmdMessage
import com.igexin.sdk.message.GTTransmitMessage

/**
 * 继承 GTIntentService 接收来自个推的消息, 所有消息在线程中回调, 如果注册了该服务, 则务必要在 AndroidManifest中声明, 否则无法接受消息<br></br>
 * onReceiveMessageData 处理透传消息<br></br>
 * onReceiveClientId 接收 cid <br></br>
 * onReceiveOnlineState cid 离线上线通知 <br></br>
 * onReceiveCommandResult 各种事件处理回执 <br></br>
 */
class DemoIntentService : GTIntentService() {

    override fun onReceiveServicePid(context: Context, pid: Int) {}

    override fun onReceiveMessageData(context: Context, msg: GTTransmitMessage) {}

    override fun onReceiveClientId(context: Context, clientid: String) {
        Log.e(GTIntentService.TAG, "onReceiveClientId ----------> " + "clientid = " + clientid)
    }

    override fun onReceiveOnlineState(context: Context, online: Boolean) {}

    override fun onReceiveCommandResult(context: Context, cmdMessage: GTCmdMessage) {}
}